home *** CD-ROM | disk | FTP | other *** search
- > Actually, the speed seems only a little improved, but I've started to
-
- I was afraid of that.
-
- > optimise the code only this week end, I'll continue to optimise it now ...
-
- I hope you find a lot of improvements to make.
-
- > Could you send me the sector height check function, I'll implement it..
-
- I'll send it at the same time as the map drawing code. I doubt it's really
- a good idea to implement the current version, though. It's not very smart
- at all. On the other hand it mostly uses code you've already written so it
- shouldn't take you long.
-
- By the way, does anyone have an idea for a good algorithm for the following:
- + We have an (x,y) position and a movement vector (or second position).
- + We have a lot of convex polygons.
- Now:
- - Find the polygon that contains the first position.
- (You can assume this is known.)
- - Find out which side of the polygon is crossed by the line (x,y) ->
- (x+dx,y+dy), if any.
- - Find out where on the polygon side the movement vector intersects it.
- - Force the movement to be contained within the original polygon by 'sliding'
- along the sides.
-
- It is of course possible to do some checks using the line equations, but
- that takes divides and such which isn't very nice. Perhaps it's the only
- way, but I sure hope not.
-
- > No, I've still got them. When I say correctly displaying, I mean that until
- > last week, my walls were very strange : they were displayed everywhere... :)
-
- ;-)
-
- > What do you call the Direct drawing ? Do you mean with your method ?
-
- Yes, drawing the walls and floors/ceiling as soon as you know how rather
- than waiting until they're all known. I believe that's the best way to do
- it even if we have to keep all the clipping arrays.
-
- I had a new idea about a fix for the clipping errors a couple of days ago,
- but it probably works just as well the ones I've had before...
- Perhaps some of our new participants on the list would like to have a go
- at it? A fresh look at the problem might solve it in a few minutes.
-
- --
- Chalmers University | Why are these | e-mail: d8klojo@dtek.chalmers.se
- of Technology | .signatures | rand@cd.chalmers.se
- | so hard to do | www/ftp: rand.thn.htu.se
- Gothenburg, Sweden | well? | (MGIFv5 and QLem)
-
-